package com.foreknow.demo19;

public class ThrowsDemo {

    public void method() throws Exception{
        throw new Exception(); //人为抛出的了异常(真实存在的)
    }

    public static void main(String[] args){
        ThrowsDemo demo = new ThrowsDemo();
        try {
            demo.method();
        } catch (Exception e) {
            System.out.println(e.toString());
            //System.out.println("产生的Exception异常"+e.getMessage());
        }
    }
}